Skip to content

feat(benchmark): rewrite the public API#10113

Draft
sheremet-va wants to merge 37 commits intovitest-dev:mainfrom
sheremet-va:feat/rewrite-benchmarks
Draft

feat(benchmark): rewrite the public API#10113
sheremet-va wants to merge 37 commits intovitest-dev:mainfrom
sheremet-va:feat/rewrite-benchmarks

Conversation

@sheremet-va
Copy link
Copy Markdown
Member

@sheremet-va sheremet-va commented Apr 9, 2026

Related #7850

New API as part of the test instead of being a test:

import { expect, test } from 'vitest'

test('compare JSON libraries', async ({ bench }) => {
  const input = '{"key":"value","nested":{"a":1}}'

  const result = await bench.compare(
    bench('JSON.parse', () => {
      JSON.parse(input)
    }),
    bench('custom parser', () => {
      customParse(input)
    }),
  )
})

@sheremet-va sheremet-va changed the title Feat/rewrite benchmarks feat(benchmark): rewrite the public API Apr 9, 2026
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 9, 2026

Deploy Preview for vitest-dev ready!

Name Link
🔨 Latest commit 1f85dea
🔍 Latest deploy log https://app.netlify.com/projects/vitest-dev/deploys/69e2650abfb2460007c90340
😎 Deploy Preview https://deploy-preview-10113--vitest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@sheremet-va sheremet-va added this to the 5.0.0 milestone Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant